import React, { Component, PureComponent } from 'react';
import { StyleSheet, Text, View, Button, DeviceEventEmitter } from 'react-native';
import { AntDesign } from '@expo/vector-icons'; 
import styles from 'src/styles';

function Home({ navigation }) {
  return (
    <View style={styles.container}>
      <Text>HOME</Text>
      <AntDesign name="smileo" size={32} color="green" />
      <Button onPress={() => {
        console.log('Go Welcome');
        console.log(navigation?.state?.routes);
        navigation.navigate('welcome');
      }} title='Go Welcome' />
      <Button onPress={() => {
        console.log('Go Home');
        console.log(navigation?.state);
        navigation.navigate('other');
      }} title='Go Other' />
      <Button onPress={() => {
        // console.log('Go Home');
        // console.log(navigation?.state);
        navigation.navigate('parent');
      }} title='Go Parent' />
      <Button onPress={() => {
        // console.log('Go Home');
        // console.log(navigation?.state);
        navigation.navigate('child');
      }} title='Go Child' />
      <Button onPress={() => {
        // console.log('Go Home');
        // console.log(navigation?.state);
        navigation.navigate('home1');
      }} title='Go Home 1' />
      <Button onPress={() => {
        // console.log('Go Home');
        // console.log(navigation?.state);
        navigation.navigate('home2');
      }} title='Go Home 2' />
      <Button onPress={() => {
        navigation.navigate('others');
      }} title='Go Others' />
      <Button onPress={() => {
        navigation.navigate('setting');
      }} title='Go Setting' />
      <Button onPress={() => {
        navigation.navigate('userInfo', { title: 'New Member Info' });
      }} title='Go User Info' />
    </View>
  )
}

export default Home;
